package com.fcscs.cservice.ws.client.inroomservice;

import org.apache.log4j.Logger;
import org.springframework.ws.client.core.support.WebServiceGatewaySupport;

import com.fcscs.cservice.ws.schema.inroomservice.GetItemsRequest;
import com.fcscs.cservice.ws.schema.inroomservice.GetItemsResponse;

public class GetItemsClient extends WebServiceGatewaySupport {

	private static final Logger LOG = Logger.getLogger(GetItemsClient.class);

	public GetItemsResponse getItems(GetItemsRequest req) {
		GetItemsResponse resp = (GetItemsResponse)getWebServiceTemplate().marshalSendAndReceive(req);
		LOG.info("---------- GetItemsResponse: " + resp.getItemList() == null ? 0 : resp.getItemList().size());
		return resp;
	}
}
